package day19.zhiyou100;

import java.text.BreakIterator;

public class Demo001 {
    public static void main(String[] args) {
        B b1 = new B();
        B b2 = new B();
        B b3 = new B();
        b1.start();
        b2.start();
        b3.start();

    }
}

class B extends Thread {

    static double money = 100;
    static final Object obj = new Object();

    /*
    @Override
    public void run() {
        if (money > 0) {
            // 卖票
            while (true) {
                synchronized (this) {
                    System.out.println(Thread.currentThread().getName() + " " + money);
                    money -= 1;
                    //Thread.yield();
                }
            }
        }
    }*/

}